package com.reconcile.phone.common.config;

import lombok.Data;
import org.springframework.beans.factory.InitializingBean;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;

/**
 * 微信APP登录配置
 *
 * @author zlj
 * @version 2023/3/3
 */
@Data
@Configuration
@ConfigurationProperties(prefix = "wxapp")
public class WxAppLoginProperties implements InitializingBean {

  /**
   * appID
   */
  private String appID;

  /**
   * app密匙
   */
  private String appSecret;

  /**
   * appID常量
   */
  public static String WX_APP_OPEN_APP_ID;

  /**
   * app密匙常量
   */
  public static String WX_APP_OPEN_APP_SECRET;

  @Override
  public void afterPropertiesSet() {
    WX_APP_OPEN_APP_ID = this.appID;
    WX_APP_OPEN_APP_SECRET = this.appSecret;
  }
}
